HardwareKeyOptions

@objc
final class HardwareKeyOptions
extension HardwareKeyOptions : CVarArg, CustomDebugStringConvertible, CustomStringConvertible, Equatable, Hashable, NSObjectProtocol

Undocumented

  • Target YubiKey serial number. When nil any connected YubiKey is accepted.

    Declaration

    Swift

    var targetSerial: UInt?
  • pin

    PIN used for PIV operations on the YubiKey.

    Declaration

    Swift

    var pin: String
  • Undocumented

    Declaration

    Swift

    init(targetSerial: UInt? = nil, pin: String = "123456")
  • listAvailableKeys() Asynchronous

    Returns the names of all currently connected YubiKey slots.

    Declaration

    Swift

    @available(macOS, introduced: 10.15)
    @available(iOS, introduced: 13.0)
    static func listAvailableKeys() async -> [String]

    Return Value

    An array of slot name strings (e.g. ["YubiKey OTP+FIDO+CCID 0"]), or an empty array when no YubiKey is connected.

  • Undocumented

    Declaration

    Swift

    @available(macOS, introduced: 10.15)
    @available(iOS, introduced: 13.0)
    static func availableDevices() async throws(SmartCardConnectionError) -> [USBSmartCard.YubiKeyDevice]